{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}
{% set memberlevel = memberlevel|default(null) %}
{% set modalSize = 'large' %}
{% block title %}
设置图片
{% endblock %}

{% block body %}
<div id="system-picture">
	<div class="bs-example bs-example-tabs">
	  	<ul id="myTab" class="nav nav-tabs">
	    	<li class="active"><a href="#system" data-toggle="tab">系统内置</a></li>
	    	<li class=""><a href="#user-defined" data-toggle="tab">自定义</a></li>
	  	</ul>
	 	<div id="myTabContent" class="tab-content">
		    <div class="tab-pane fade active in container" id="system">
		    	<span class="help-block">系统默认图片列表</span>
		    	<div class="row">
			      	<div class="radio-inline col-md-1">
					  <label style="max-width:100%">
					    <input type="radio" name="system-picture" id="system-picture1" value="{{ asset('assets/img/default/vip_1b.jpg') }}" checked="checked">
					   	<img src="{{ asset('assets/img/default/vip_1b.jpg') }}" class="img-responsive" />
					  </label>
					</div>
					<div class="radio-inline col-md-1">
					  <label style="max-width:100%">
					    <input type="radio" name="system-picture" id="system-picture2" value="{{ asset('assets/img/default/vip_2b.jpg') }}">
					    <img src="{{ asset('assets/img/default/vip_2b.jpg') }}" class="img-responsive" />
					  </label>
					</div>
					<div class="radio-inline col-md-1">
					  <label style="max-width:100%">
					    <input type="radio" name="system-picture" id="system-picture3" value="{{ asset('assets/img/default/vip_3b.jpg') }}">
					    <img src="{{ asset('assets/img/default/vip_3b.jpg') }}" class="img-responsive" />
					  </label>
					</div>
					<div class="radio-inline col-md-1">
					  <label style="max-width:100%">
					    <input type="radio" name="system-picture" id="system-picture3" value="{{ asset('assets/img/default/vip_4b.jpg') }}">
					    <img src="{{ asset('assets/img/default/vip_4b.jpg') }}" class="img-responsive" />
					  </label>
					</div>
				</div>
		    </div>
		    <div class="tab-pane fade" id="user-defined">
				<form>
					<input type="hidden" name="uploadPicture">
				    <div class="row" id="pictureContent"></div>
				</form>
				<span class="help-block">建议图片尺寸480×240,文件大小<=200KB</span>
				<form id="picture-upload-form" action="{{ path('file_upload', {group:'default'}) }}" method="post" enctype="multipart/form-data">
				  <input class="btn btn-default btn-sm" type="file" name="file" value="上传" style="display:inline-block;" accept="image/gif,image/jpeg,image/png" id="picture-upload-input">
				  <button class="btn btn-default btn-sm">上传图片</button>
				  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
				</form>
		    </div>
	  	</div>
	</div>
</div>
{% endblock %}

{% block footer %}
  <button type="submit" class="btn btn-primary pull-right" id="upload-picture-btn">确定</button>
  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">取消</button>
  <script>app.load('vipbundle/controller/vipleveladmin/picture')</script>
{% endblock %}
  